package com.hfy.huipaywater;

import android.app.Application;

import com.facebook.react.ReactApplication;
//import com.microsoft.codepush.react.CodePush;
import com.imagepicker.ImagePickerPackage;
import com.BV.LinearGradient.LinearGradientPackage;
import me.ele.dodo.AMapLocationReactPackage;
import com.theweflex.react.WeChatPackage;
import cn.reactnative.modules.update.UpdatePackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
//import cn.reactnative.modules.update.UpdateContext;
import java.util.Arrays;
import java.util.List;
import com.lynxit.contactswrapper.ContactsWrapperPackage;
import com.laoqiu.amap.AMapReactPackage;
import com.hfy.huipaywater.reactNative.ExampleReactPackage;
import cn.reactnative.alipay.AlipayPackage;
//import com.microsoft.codepush.react.CodePush;

public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {

    //@Override
        //protected String getJSBundleFile() {
          //return CodePush.getJSBundleFile();
        //}

    @Override
    public boolean getUseDeveloperSupport() {
      //return BuildConfig.DEBUG;
      return true;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            //new CodePush("UuNwIBpZhzR6BGc6049qxB_2T-Nu40443dec-1fc5-457e-8543-09cdeab1b77c", MainApplication.this, BuildConfig.DEBUG),
            new ImagePickerPackage(),
            new LinearGradientPackage(),
            new AMapLocationReactPackage(),
           
            new WeChatPackage(),
            new VectorIconsPackage(),
            new UpdatePackage(),
            new SplashScreenReactPackage(),
            new ContactsWrapperPackage(),
            new AMapReactPackage(),
            new ExampleReactPackage(),
            new AlipayPackage()
      );
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
  }
}
